<title>微信充值</title>
<style>
    body{ background:#f5f5f5;}
    .wx_img{ margin-top:30px;}
    .wx_img img{ border:1px solid #ddd;width: 300px}
</style>   
</head>
<body>

    <div align="center" >
        <h1 style="color:red;">微信扫码支付</h1>
        <h5>
        订单号：{$data['order_id']}<br>
        商品名称：{$data['title']}<br>
        共支付金额：{$data['total']}
        </h5>
        <!-- <img src="__ROOT__/home/images/WePayLogo.jpg" width="180px;" style="display:block; margin:0px auto; margin-top:100px;"> -->
        <div class="wx_img"><img alt="微信扫码支付" src="http://paysdk.weixin.qq.com/example/qrcode.php?data={$url2}"></div>
        <input type="hidden" value="201711241718196942" id="order_no"/>
    </div>
    <style>
        button{
            background-color: #7fbf4d;
            background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #7fbf4d), color-stop(100%, #63a62f));
            background-image: -webkit-linear-gradient(top, #7fbf4d, #63a62f);
            background-image: -moz-linear-gradient(top, #7fbf4d, #63a62f);
            background-image: -ms-linear-gradient(top, #7fbf4d, #63a62f);
            background-image: -o-linear-gradient(top, #7fbf4d, #63a62f);
            background-image: linear-gradient(top, #7fbf4d, #63a62f);
            border: 1px solid #63a62f;
            border-bottom: 1px solid #5b992b;
            border-radius: 3px;
            -webkit-box-shadow: inset 0 1px 0 0 #96ca6d;
            box-shadow: inset 0 1px 0 0 #96ca6d;
            color: #fff;
            font: bold 11px/1 "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
            padding: 7px 0 8px 0;
            text-align: center;
            text-shadow: 0 -1px 0 #4c9021;
            width: 150px;
        }
    </style>
</body>
</html>
<script type="text/javascript" src="__ROOT__/home/basic/js/jquery-1.7.min.js"></script>
<script>
    var order_no = "{$data['order_id']}";
    changeOrderStatues();
    function changeOrderStatues() {

        $.post("{:url('/wxnotify')}", {order_id: order_no}, function(data) {
            if (data.status==1) {
                //订单状态为1表示支付成功
                location.href = "/success/"+data.id+'.html';//页面跳转
            }
        })
        setTimeout("changeOrderStatues()", 2000);
    }
</script>